#include <allegro.h>
#include <stdio.h>
#include "jeux.h"
#define NB_IMAGES 2

int main() {
  int i ;
	char buf[50];
	BITMAP *Buffer;
	PERSO p;
	PERSO p1;
	balle bl;
	balle bl1;
 	 
         
	/* General initialization function */
	allegro_init();
	if (install_keyboard() == -1) {
		allegro_message("Error! %s", allegro_error);
		return -1;
	}
	set_color_depth(16);
	if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 1200,700, 0, 0) != 0) {
		set_gfx_mode(GFX_TEXT, 0, 0, 0, 0); /* here’s the command for text mode */
		allegro_message("Unable to initialize video mode!\n%s\n", allegro_error);
		return 1;
	}
	Buffer = create_bitmap(1200, 700);

chargement (&bl,&bl1,&p,&p1,buf);
 while (!key[KEY_ESC]) 
{
deplacementettir(&bl,&bl1,&p,&p1,Buffer);	

}

/*for (i = 0; i < NB_IMAGES; i++) 
{
		destroy_bitmap(p.img_right[i]);
		destroy_bitmap(p1.img_left[i]);
}
		destroy_bitmap(Buffer);*/
}
